package com.ff.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ff.dao.ShopDao;
import com.ff.model.Shop;

@Service
public class ShopService {
	@Autowired
	private ShopDao sdao;
	public void setSdao(ShopDao sdao) {
		this.sdao = sdao;
	}
	public int find_() {
		List<Shop> list=sdao.select_();
		int a=15;
		int b=list.size();
		int c=(b/a)+1;
		return c;
	}
	public List<Shop> find_limit(int id) {
		int id1=1;
		int cnt1=15;
		if(id!=0) {
			id1=id;
		}
		int id2=(id1-1)*cnt1;
		return sdao.select_limit(id2, cnt1);
	}
	public int insert11(Shop s) {
		return sdao.insert11(s);
	}
	public Shop find11(int id) {
		return sdao.find11(id);
	}
	public int update11(Shop s) {
		return sdao.update11(s);
	}
	public int delete01(int id) {
		return sdao.delete01(id);
	}
	public List<Shop> find12(int uid) {
		return sdao.find12(uid);
	}
	public Shop find13(int fid, int id) {
		return sdao.find13(fid,id);
	}
	
}
